﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <script src="./node_modules/vue/dist/vue.min.js"></script>
    <link rel="stylesheet" href="./node_modules/animate.css/animate.min.css">
    <style>
    .v-enter,.v-leave-to{
        opacity: 0;
        transform: translateX(80px);
    }
    .v-enter-active,.v-leave-active{
        transition: all 0.4s ease;
    }
    </style>
</head>
<body>
<div id="app">
    <input type="button" value="toggle" @click="flag=!flag"/>
    <transition>
        <h3 v-show="flag">这是一个h3</h3>
    </transition>

    <transition enter-active-class="animated bounceIn" leave-active-class="animated bounceOut" :duration="{enter:200,leave:400}">
        <h3 v-show="flag">这是一个h3</h3>
    </transition>
</div>


<script>
    var vm=new Vue({
        el:"#app",
        data:{
            flag:false
    
        },
        methods:{
    
        }
    })
    </script>
</body>
</html>